package com.wang.Param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="账号和邮箱登录参数", description="用于账号和邮箱登录入参")
public class UserLoginUserAccountParam implements Serializable {

    private static final long serialVersionUID = 1L;

//    @Pattern(regexp = "[0-9a-zA-Z_]{6,12}@[0-9a-zA-Z_]{2,8}(\\.[a-z]{2,10}){1,2}",message = "邮箱格式不正确")
    @Length(min = 6,max = 20,message = "用户名的长度6-20")
    @ApiModelProperty(value = "账号/邮箱")
    private  String userAccount;

    @Length(min = 6,max = 20,message = "密码的长度6-20")
    @ApiModelProperty(value = "密码")
    private  String userPassword;

    @Length(min = 6,max = 6,message = "用户名的长度6")
    @ApiModelProperty(value = "验证码")
    private  String verificationCode;
}
